package barbershop.com.dao;

import barbershop.com.entity.ServiceType;
import barbershop.com.entity.Services;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ServicesDao extends JpaRepository<Services, Integer> {
//    @Query(value = "select * from services where  service_type_service_type_id =?1",
//    nativeQuery = true)
//    List<Services> findByServiceType(ServiceType serviceType);
    List<Services> findAllByServiceType_ServiceTypeId(Integer serviceTypeId);
}
